package com.my.financial.jpaRepository;


import java.util.List;

import javax.persistence.LockModeType;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Lock;

import com.my.financial.domain.FinancialAccount;

public interface AccountRepository extends JpaRepository<FinancialAccount,Long>,
		JpaSpecificationExecutor<FinancialAccount> {
	List<FinancialAccount> findByUserId(Long userId);
	@Lock(LockModeType.PESSIMISTIC_WRITE)FinancialAccount findOne(Long id);
}
